//
//  WYCTeamCell.m
//  51信用卡
//
//  Created by 中企互联 on 2017/11/16.
//  Copyright © 2017年 中企互联. All rights reserved.
//

#import "WYCTeamCell.h"

@implementation WYCTeamCell

+ (instancetype)cellWithTableView:(UITableView *)tableView{
    WYCTeamCell * cell = [tableView dequeueReusableCellWithIdentifier:[WYCTeamCell ID]];
    if (!cell) {
        cell = [[WYCTeamCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:[WYCTeamCell ID]];
    }
    
    
    return cell;
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self setMember];
        
    }
    return self;
}

- (void)setMember{
    self.photoImage = [[UIImageView alloc] init];
    self.photoImage.frame = CGRectMake(WYCClearance, WYCClearance, 60 * px, 60 * px);
    self.photoImage.layer.masksToBounds = YES;
    self.photoImage.backgroundColor = [UIColor redColor];
    self.photoImage.layer.cornerRadius = self.photoImage.width / 2;
    [self.contentView addSubview:self.photoImage];
    
    self.nameLabel = [[UILabel alloc] init];
    self.nameLabel.frame = CGRectMake(CGRectGetMaxX(self.photoImage.frame) + WYCClearance, self.photoImage.y, 150 * px, 50 * px);
    self.nameLabel.text = @"李*龙";
    self.nameLabel.font = smallLight;
    [self.contentView addSubview:self.nameLabel];
    
    self.numberLabel = [[UILabel alloc] init];
    self.numberLabel.frame = CGRectMake(ScreenWidth / 3, self.photoImage.y, ScreenWidth / 3, 50 * px);
    self.numberLabel.font = smallLight;
    self.numberLabel.textAlignment = NSTextAlignmentCenter;
    self.numberLabel.text = @"300人";
    [self.contentView addSubview:self.numberLabel];
    
    
    self.ProfitLabel = [[UILabel alloc] init];
    self.ProfitLabel.frame = CGRectMake(ScreenWidth / 3 * 2, self.photoImage.y, ScreenWidth / 3 - WYCClearance, 50 * px);
    self.ProfitLabel.font = smallLight;
    self.ProfitLabel.textAlignment = NSTextAlignmentCenter;
    self.ProfitLabel.text = @"600";
    [self.contentView addSubview:self.ProfitLabel];
    
    
}


+(NSString *)ID{
    return @"cell";
}
@end
